#include <QResizeEvent>

#include "GraphicsView.h"

CGraphicsView::CGraphicsView()
{
        Qt::WindowFlags flags = windowFlags() | Qt::MSWindowsFixedSizeDialogHint;
        flags = flags & ~Qt::WindowMaximizeButtonHint;

        setWindowFlags(flags);

        setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
        setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
}

void CGraphicsView::resizeEvent(QResizeEvent *event)
{
        if(scene() != NULL)
        {
                scene()->setSceneRect(0, 0, width(), height());
                QGraphicsView::resizeEvent(event);
        }
}
